/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.polymorphism.mobile;

/**
 *
 * @author Enkosi
 */
public class Salaried extends Employee{
   double salary; 
   
   public Salaried(String nam, double sal)  { 
      super(nam); 
      this.salary = sal; 
   } 
  
   public void setSalary(double s)  { 
      salary = s; 
   } 
  
   public double getSalary()  { 
      return salary; 
   } 
   @Override
   public double pay()  { 
      return salary; 
   } 
  
   @Override
   public String toString()  { 
      return super.toString() + " (salary is " + salary + ")"; 
   }   
}
